package com.fishery.base.controller;

import com.fishery.entity.Result;
import com.fishery.util.FileUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


@RestController
@RequestMapping("/base/file")
@CrossOrigin
@Api(tags = "文件管理")
public class FileController {


	@PostMapping("/upload")
	@ApiOperation("文件上传")
	public Result upload(MultipartFile multipartFile) {
		String ret = FileUtil.upload(multipartFile);
		return Result.success().data(ret);
	}


}
